package com.managertrade.dao.sqlite.repository;

import com.managertrade.dao.sqlite.entity.TradeRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TradeRecordRepository extends JpaRepository<TradeRecord, Long> {
    // 按时间降序取最近 N 条
    List<TradeRecord> findTop100ByOrderByOperationTimeDesc();

    // 按 symbol 查询
    List<TradeRecord> findBySymbolOrderByOperationTimeDesc(String symbol);
}
